export default

	function Merge(str_arr: string[], conditions: string, flag?: boolean) {

	if (str_arr.length === 2) {

		if (flag) {


			if (str_arr[0][0] === '(' && str_arr[0][str_arr[0].length - 1] === ')' && str_arr[1][0] === '(' && str_arr[1][str_arr[1].length - 1] === ')') {	// 1合并2合并

				return `(` + str_arr[0] + `)` + ` ${conditions} ` + `(` + str_arr[1] + `)`;

			} else if (str_arr[0][0] === '(' && str_arr[0][str_arr[0].length - 1] === ')' && str_arr[1][0] !== '(' && str_arr[1][str_arr[1].length - 1] !== ')') {// 1合并2不合并


				return '(' + str_arr[0] + ')' + ` ${conditions} ` + '(' + str_arr[1] + ')';

			} else if (str_arr[0][0] !== '(' && str_arr[0][str_arr[0].length - 1] !== ')' && str_arr[1][0] === '(' && str_arr[1][str_arr[1].length - 1] === ')') {// 1不合并2合并

				return '(' + str_arr[0] + ')' + ` ${conditions} ` + str_arr[1];
			} else {


				return '(' + str_arr[0] + ')' + ` ${conditions} ` + '(' + str_arr[1] + ')';
			}

		} else {
			return str_arr[0] + ` ${conditions} ` + str_arr[1];

		}
	} else {
		return '合并格式不正确';
	}
}


